.highlight-wrapper {
  position: relative;
  margin: 1.5rem auto 1rem;

  .lang {
    color: white;
    position: absolute;
    right: 0;
    top: 0;
    font-size: 0.75rem;
    font-style: italic;
    opacity: 0.5;
    padding: 0.25rem 0.75rem 0.25rem 0.5rem;
    text-transform: uppercase;
  }

  .panel {
    position: absolute;
    top: -1.5rem;
    right: 0;
    padding: 0 0.5rem;
    margin-bottom: 0;
    opacity: 0;
    transition: opacity 0.5s;

    .action {
      color: variable('on-primary');

      &:not(:last-child) {
        margin-right: 1rem;
      }

      &.active,
      &:hover {
        color: variable('accent');
      }
    }
  }

  &:hover {
    .panel {
      opacity: 1;
    }
  }
}

code {
  margin: 0;
  padding: 0.25rem 0.5rem;
  color: variable('primary-text-on-surface');
  background: variable('background-light');
  border-radius: 3px;

  &.no-ln {
    .ln {
      display: none;
    }
  }
}

pre {
  background: variable('background');
  border-radius: 0.25rem;
  color: variable('on-background');
  padding: 1rem;
  position: relative;

  code {
    padding: 0;
    background: inherit !important;
    color: inherit !important;
    opacity: 1;
  }
}
